From 47d26bcb62e8e7104f244320d80e6dc30ed804ba Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 6 Mar 2025 10:31:37 +0100 Subject: [PATCH] luci-theme-material: update cascade.css to use first-of-type instead of last/first-child first-child: Selects an element that is the first child of its parent. The element must be the very first child of its parent, regardless of its type. first-of-type: Selects the first element of its type among its siblings. The element must be the first of its type (e.g.,

,

, etc.) within its parent, but it does *not* have to be the first child. Makes the CSS usage more robust if the layout changes and new html elements are added. Signed-off-by: Florian Eckert --- .../htdocs/luci-static/material/cascade.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css index ad29f36911..f6ddb74c4d 100644 --- a/themes/luci-theme-material/htdocs/luci-static/material/cascade.css +++ b/themes/luci-theme-material/htdocs/luci-static/material/cascade.css @@ -1786,11 +1786,11 @@ body:not(.Interfaces) .cbi-rowstyle-2:first-child { justify-content: space-between; } -.modal .button-row > :not(:last-child) { +.modal .button-row > button:not(:first-of-type) { margin-right: .5em; } -.modal .button-row > :first-child { +.modal .button-row > button:first-of-type { margin-right: auto; } -- 2.30.2